﻿//#include<iostream>
//using namespace std;
//#include<string.h>
//
////先声明以下Building类防止报错
//class Building;
//
//class GoodGay
//{
//public:
//	GoodGay();
//	void visit();
//
//private:
//	Building* building;
//};
//
//class Building
//{
//	friend class GoodGay;
//public:
//	Building();
//
//public:
//	string m_SettingRoom;
//private:
//	string m_BedRoom;
//};
//
////类内声明,类外初始化函数
//Building::Building()
//{
//	m_SettingRoom = "客厅";
//	m_BedRoom = "卧室";
//}
//
//GoodGay::GoodGay()
//{
//	building = new Building;
//}
//
//void GoodGay::visit()
//{
//	cout << "你的好基友正在访问 " << building->m_SettingRoom << endl;
//	cout << "你的好基友正在访问 " << building->m_BedRoom << endl;
//}
//
//
//
//void test01()
//{
//	GoodGay gg; //如果不用new，单纯只用Building building ；则在goodGay gg之后building将被释放
//	gg.visit();
//}
//
//
//int main()
//{
//	test01();
//}